import request from '@/utils/request'

export function getOrderList(params) {
  return request({
    url: '/order/list',
    method: 'get',
    params
  })
}

export function getOrderById(params) {
  return request({
    url: '/order/detail',
    method: 'get',
    params
  })
}

export function uploadFile(data) {
  return request({
    url: '/order/uploadFile',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

export function savePics(data) {
  return request({
    url: '/order/savePics',
    method: 'post',
    data
  })
}

export function addOrder(data) {
  return request({
    url: '/order/addOrder',
    method: 'post',
    data
  })
}

export function orderBase(data) {
  return request({
    url: '/order/orderBase',
    method: 'post',
    data
  })
}

export function importOrder(data) {
  return request({
    url: '/order/importOrder',
    method: 'post',
    data
  })
}

export function changeOrderStatus(data) {
  return request({
    url: '/order/changeStatus',
    method: 'post',
    data
  })
}

export function deleteOrder(data) {
  return request({
    url: '/order/delete',
    method: 'post',
    data
  })
}

export function confirmOrder(data) {
  return request({
    url: '/order/confirm',
    method: 'post',
    data
  })
}

export function rejectOrder(data) {
  return request({
    url: '/order/reject',
    method: 'post',
    data
  })
}
